/**
 * @description 同步数据库
 */

const seq = require('./seq')

require('./model/Type')

//测试链接是否成功
seq.authenticate().then(()=>{
    console.log('ok')
}).catch((err)=>{
    console.log('err',err)
})

//执行同步
seq.sync({
    force:true,
    alter: true 
}).then(()=>{ //force:true 强制同步如有重复替换
    console.log('sync ok');
    process.exit()
})
